import { isNumber } from 'lodash-es'

import type Scrollbar from '../index'

export const scrollbarEmits = {
  scroll: ({
    scrollTop,
    scrollLeft
  }: {
    scrollTop: number
    scrollLeft: number
  }) => [scrollTop, scrollLeft].every(isNumber)
}
export type ScrollbarEmits = typeof scrollbarEmits

export type ScrollbarInstance = InstanceType<typeof Scrollbar>
